package com.github.zhijieqing.socket.cluster.websocket;

import com.github.zhijieqing.socket.cluster.common.domain.TopicSocketMsg;
import com.github.zhijieqing.socket.cluster.common.listener.MessageListener;

public class TopicMsgListener implements MessageListener<TopicSocketMsg> {
    @Override
    public void onMessage(TopicSocketMsg msg) {
        WebSocketUtils.getTemplate().convertAndSend(msg.getTopic(), WebSocketUtils.getRealPayload(msg));
    }
}
